package br.com.jogo.assets;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.graphics.g2d.TextureRegion;

public class Assets {

	public static TextureRegion demoImage;
	public static TextureAtlas atlas;
	public static BitmapFont demoFont;

	public static TextureRegion[][] redmage;
	public static TextureRegion[][] grid;

	public static void load() {

		loadTextures();
		loadSounds();
		loadFonts();

	}

	private static void loadFonts() {
		demoFont = new BitmapFont(Gdx.files.internal("data/font.fnt"),
				Gdx.files.internal("data/font.png"), false);
	}

	private static void loadSounds() {

	}

	private static void loadTextures() {

		atlas = new TextureAtlas(Gdx.files.internal("data/images/images"));

		redmage = atlas.findRegion("redmage").split(
				atlas.findRegion("redmage").getRegionWidth() / 3,
				atlas.findRegion("redmage").getRegionHeight() / 4);

		demoImage = new TextureRegion(new Texture(
				Gdx.files.internal("data/libgdx.png")));

		grid = atlas.findRegion("grid").split(
				atlas.findRegion("grid").getRegionWidth() / 12,
				atlas.findRegion("grid").getRegionHeight() / 3);

	}

	public static void dispose() {
		demoFont.dispose();

	}

}
